package org.mch.biz.objs;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

/**
 * 描述：规则参数对象；</BR>
 * 
 * @author zl；Date：2008-06-08<BR/>
 * 
 */
public class ParamGuiZe {

	private String field;

	private String cssQuery;

	private String attribute;

	private List<String> removeCssQueryList = new ArrayList<String>();

	private List<String> removeAttrCssQueryList = new ArrayList<String>();

	private List<String> replaceStrList = new ArrayList<String>();

	public ParamGuiZe() {
		super();
	}

	public ParamGuiZe(String field, String cssQuery, String attribute) {
		super();
		this.field = field;
		this.cssQuery = cssQuery;
		this.attribute = attribute;
	}

	public ParamGuiZe(String field, String cssQuery, String attribute, String[] removeCssQueryss) {
		super();
		this.field = field;
		this.cssQuery = cssQuery;
		this.attribute = attribute;
		if (removeCssQueryss != null && removeCssQueryss.length > 0) {
			this.removeCssQueryList = new ArrayList<String>(Arrays.asList(removeCssQueryss));
		}
	}

	public ParamGuiZe(String field, String cssQuery, String attribute, String[] removeCssQueryss, String[] removeAttrCssQueryss, String[] replaceStrss) {
		super();
		this.field = field;
		this.cssQuery = cssQuery;
		this.attribute = attribute;
		if (removeCssQueryss != null && removeCssQueryss.length > 0) {
			this.removeCssQueryList = new ArrayList<String>(Arrays.asList(removeCssQueryss));
		}
		if (removeAttrCssQueryss != null && removeAttrCssQueryss.length > 0) {
			this.removeAttrCssQueryList = new ArrayList<String>(Arrays.asList(removeAttrCssQueryss));
		}
		if (replaceStrss != null && replaceStrss.length > 0) {
			this.replaceStrList = new ArrayList<String>(Arrays.asList(replaceStrss));
		}
	}

	public void addRemoveCssQuery(String cssQuery) {
		if (removeCssQueryList == null) {
			removeCssQueryList = new ArrayList<String>();
		}

		removeCssQueryList.add(cssQuery);
	}

	public String getCssQuery() {
		return cssQuery;
	}

	public void setCssQuery(String cssQuery) {
		this.cssQuery = cssQuery;
	}

	public String getAttribute() {
		return attribute;
	}

	public void setAttribute(String attribute) {
		this.attribute = attribute;
	}

	public List<String> getRemoveCssQueryList() {
		return removeCssQueryList;
	}

	public void setRemoveCssQueryList(List<String> removeCssQueryList) {
		this.removeCssQueryList = removeCssQueryList;
	}

	public void setRemoveCssQueryList(String[] removeCssQueryList) {
		if (removeCssQueryList != null && removeCssQueryList.length > 0) {
			this.removeCssQueryList = new ArrayList<String>(Arrays.asList(removeCssQueryList));
		}
	}

	public String getField() {
		return field;
	}

	public List<String> getRemoveAttrCssQueryList() {
		return removeAttrCssQueryList;
	}

	public void setRemoveAttrCssQueryList(List<String> removeAttrCssQueryList) {
		this.removeAttrCssQueryList = removeAttrCssQueryList;
	}

	public void setRemoveAttrCssQueryList(String[] removeAttrCssQueryList) {
		if (removeAttrCssQueryList != null && removeAttrCssQueryList.length > 0) {
			this.removeAttrCssQueryList = new ArrayList<String>(Arrays.asList(removeAttrCssQueryList));
		}
	}

	public List<String> getReplaceStrList() {
		return replaceStrList;
	}

	public void setReplaceStrList(List<String> replaceStrList) {
		this.replaceStrList = replaceStrList;
	}

	public void setReplaceStrList(String[] replaceStrList) {
		if (replaceStrList != null && replaceStrList.length > 0) {
			this.replaceStrList = new ArrayList<String>(Arrays.asList(replaceStrList));
		}
	}

	public void setField(String field) {
		this.field = field;
	}
}
